﻿using UnityEngine;
using System.Collections;
using UnityEngine.UI;
using Magic.Samples.DisplaySettings;
public class ButtonEvent : MonoBehaviour {
    public Button _rotateNDesktop;
    public Button _rotateSDesktop;
    public Button _resetDesktop;
    private DisplaySettings _originalSettings;
    private bool rotated = false;
    // Use this for initialization
    void Start () {
        _originalSettings = DisplayManager.GetCurrentSettings();
        _rotateNDesktop.onClick.AddListener(new UnityEngine.Events.UnityAction(() => { DisplayManager.RotateScreen(true);  }));
        _rotateSDesktop.onClick.AddListener(new UnityEngine.Events.UnityAction(() => { DisplayManager.RotateScreen(false); }));
        _resetDesktop.onClick.AddListener(new UnityEngine.Events.UnityAction(() => { rotated = !rotated; DisplayManager.ToggleRotateScrren180(rotated); }));
	}
	
	// Update is called once per frame
	void Update () {
	
	}
}
